package com.weijin.model.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.weijin.model.enums.AttendanceStatus;
import com.weijin.model.enums.AttendanceType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 异常打卡信息
 *
 * @Author WeiJin
 * @Version 1.0
 * @Date 2025/3/28 13:36
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("异常打卡记录信息实体类")
public class ExceptionRecordInfo {
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("用户id")
    private String userId;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("打卡时间")
    private LocalDateTime time;
    @ApiModelProperty("打卡类型")
    private AttendanceType type;
    @ApiModelProperty("打卡状态")
    private AttendanceStatus status;
    @ApiModelProperty("相差时间,单位秒")
    private Long differTime;

    public ExceptionRecordInfo(String userId, String name, LocalDateTime time, AttendanceType type, AttendanceStatus status, Long timeLength) {
        this.userId = userId;
        this.name = name;
        this.time = time;
        this.type = type;
        this.status = status;
        this.differTime = timeLength;
    }
}
